home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Games: Greatest Hits 1996
/
Amiga Games: Greatest Hits 1996.iso
/
archive
/
userbox
/
publicdomain
/
identify.lha
/
Identify
/
include
/
inline
/
identify.h
Wrap
C/C++ Source or Header
|
1996-06-06
|
2KB
|
88 lines
#ifndef _INLINE_IDENTIFY_H
#define _INLINE_IDENTIFY_H
#include <sys/cdefs.h>
#include <inline/stubs.h>
__BEGIN_DECLS
#ifndef BASE_EXT_DECL
#define BASE_EXT_DECL
#define BASE_EXT_DECL0 extern struct Library * IdentifyBase;
#endif
#ifndef BASE_PAR_DECL
#define BASE_PAR_DECL
#define BASE_PAR_DECL0 void
#endif
#ifndef BASE_NAME
#define BASE_NAME IdentifyBase
#endif
BASE_EXT_DECL0
static __inline LONG
IdAlert (BASE_PAR_DECL ULONG code, struct TagItem *taglist)
{
BASE_EXT_DECL
register LONG _res __asm("d0");
register struct Library *a6 __asm("a6") = BASE_NAME;
register ULONG d0 __asm("d0") = code;
register struct TagItem * a0 __asm("a0") = taglist;
__asm __volatile ("jsr a6@(-42)"
: "=r" (_res)
: "r" (a6), "r" (a0), "r" (d0)
: "a0","a1","d0","d1", "memory");
return _res;
}
#ifndef NO_INLINE_STDARG
#define IdAlertTags(d0, tags...) \
({ struct TagItem _tags[] = { tags }; IdAlert ((d0), _tags); })
#endif /* not NO_INLINE_STDARG */
static __inline LONG
IdExpansion (BASE_PAR_DECL struct TagItem *taglist)
{
BASE_EXT_DECL
register LONG _res __asm("d0");
register struct Library *a6 __asm("a6") = BASE_NAME;
register struct TagItem * a0 __asm("a0") = taglist;
__asm __volatile ("jsr a6@(-30)"
: "=r" (_res)
: "r" (a6), "r" (a0), "r" (d0)
: "a0","a1","d0","d1", "memory");
return _res;
}
#ifndef NO_INLINE_STDARG
#define IdExpansionTags(tags...) \
({ struct TagItem _tags[] = { tags }; IdExpansion (_tags); })
#endif /* not NO_INLINE_STDARG */
static __inline STRPTR
IdHardware (BASE_PAR_DECL ULONG type, struct TagItem *taglist)
{
BASE_EXT_DECL
register STRPTR _res __asm("d0");
register struct Library *a6 __asm("a6") = BASE_NAME;
register ULONG d0 __asm("d0") = type;
register struct TagItem * a0 __asm("a0") = taglist;
__asm __volatile ("jsr a6@(-36)"
: "=r" (_res)
: "r" (a6), "r" (a0), "r" (d0)
: "a0","a1","d0","d1", "memory");
return _res;
}
#ifndef NO_INLINE_STDARG
#define IdHardwareTags(d0, tags...) \
({ struct TagItem _tags[] = { tags }; IdHardware ((d0), _tags); })
#endif /* not NO_INLINE_STDARG */
#undef BASE_EXT_DECL
#undef BASE_EXT_DECL0
#undef BASE_PAR_DECL
#undef BASE_PAR_DECL0
#undef BASE_NAME
__END_DECLS
#endif /* _INLINE_IDENTIFY_H */